//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS CodeStarNotifications service.
///
/// This CodeStar Notifications API Reference provides descriptions and usage examples of the operations and data types for the CodeStar Notifications API. You can use the CodeStar Notifications API to work with the following objects: Notification rules, by calling the following:     CreateNotificationRule, which creates a notification rule for a resource in your account.     DeleteNotificationRule, which deletes a notification rule.     DescribeNotificationRule, which provides information about a notification rule.     ListNotificationRules, which lists the notification rules associated with your account.     UpdateNotificationRule, which changes the name, events, or targets associated with a notification rule.     Subscribe, which subscribes a target to a notification rule.     Unsubscribe, which removes a target from a notification rule.    Targets, by calling the following:     DeleteTarget, which removes a notification rule target from a notification rule.     ListTargets, which lists the targets associated with a notification rule.    Events, by calling the following:     ListEventTypes, which lists the event types you can include in a notification rule.    Tags, by calling the following:     ListTagsForResource, which lists the tags already associated with a notification rule in your account.     TagResource, which associates a tag you provide with a notification rule in your account.     UntagResource, which removes a tag from a notification rule in your account.    For information about how to use CodeStar Notifications, see the Amazon Web Services Developer Tools Console User Guide.
public struct CodeStarNotifications: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the CodeStarNotifications client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "CodeStarNotifications",
            serviceIdentifier: "codestar-notifications",
            serviceProtocol: .restjson,
            apiVersion: "2019-10-15",
            endpoint: endpoint,
            errorType: CodeStarNotificationsErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients configured for Slack) where you want to receive them.
    @Sendable
    @inlinable
    public func createNotificationRule(_ input: CreateNotificationRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateNotificationRuleResult {
        try await self.client.execute(
            operation: "CreateNotificationRule", 
            path: "/createNotificationRule", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a notification rule for a resource. The rule specifies the events you want notifications about and the targets (such as Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients configured for Slack) where you want to receive them.
    ///
    /// Parameters:
    ///   - clientRequestToken: A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token.  The Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an idempotency token is created for you.
    ///   - detailType: The level of detail to include in the notifications for this resource. BASIC will include only the  contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by CodeStar Notifications and/or the service for the resource for which the notification is created.
    ///   - eventTypeIds: A list of event types associated with this notification rule. For a list of allowed events, see EventTypeSummary.
    ///   - name: The name for the notification rule. Notification rule names must be unique in your Amazon Web Services account.
    ///   - resource: The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in CodePipeline, repositories in CodeCommit, and build projects in CodeBuild.
    ///   - status: The status of the notification rule. The default value is ENABLED. If the status is set to DISABLED, notifications aren't sent for the notification rule.
    ///   - tags: A list of tags to apply to this notification rule. Key names cannot start with "aws".
    ///   - targets: A list of Amazon Resource Names (ARNs) of Amazon Simple Notification Service topics and Amazon Q Developer in chat applications clients to associate with the notification rule.
    ///   - logger: Logger use during operation
    @inlinable
    public func createNotificationRule(
        clientRequestToken: String? = CreateNotificationRuleRequest.idempotencyToken(),
        detailType: DetailType,
        eventTypeIds: [String],
        name: String,
        resource: String,
        status: NotificationRuleStatus? = nil,
        tags: [String: String]? = nil,
        targets: [Target],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateNotificationRuleResult {
        let input = CreateNotificationRuleRequest(
            clientRequestToken: clientRequestToken, 
            detailType: detailType, 
            eventTypeIds: eventTypeIds, 
            name: name, 
            resource: resource, 
            status: status, 
            tags: tags, 
            targets: targets
        )
        return try await self.createNotificationRule(input, logger: logger)
    }

    /// Deletes a notification rule for a resource.
    @Sendable
    @inlinable
    public func deleteNotificationRule(_ input: DeleteNotificationRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteNotificationRuleResult {
        try await self.client.execute(
            operation: "DeleteNotificationRule", 
            path: "/deleteNotificationRule", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a notification rule for a resource.
    ///
    /// Parameters:
    ///   - arn: The Amazon Resource Name (ARN) of the notification rule you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteNotificationRule(
        arn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteNotificationRuleResult {
        let input = DeleteNotificationRuleRequest(
            arn: arn
        )
        return try await self.deleteNotificationRule(input, logger: logger)
    }

    /// Deletes a specified target for notifications.
    @Sendable
    @inlinable
    public func deleteTarget(_ input: DeleteTargetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteTargetResult {
        try await self.client.execute(
            operation: "DeleteTarget", 
            path: "/deleteTarget", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a specified target for notifications.
    ///
    /// Parameters:
    ///   - forceUnsubscribeAll: A Boolean value that can be used to delete all associations with this Amazon Q Developer in chat applications topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your Amazon Web Services account are deleted.
    ///   - targetAddress: The Amazon Resource Name (ARN) of the Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteTarget(
        forceUnsubscribeAll: Bool? = nil,
        targetAddress: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteTargetResult {
        let input = DeleteTargetRequest(
            forceUnsubscribeAll: forceUnsubscribeAll, 
            targetAddress: targetAddress
        )
        return try await self.deleteTarget(input, logger: logger)
    }

    /// Returns information about a specified notification rule.
    @Sendable
    @inlinable
    public func describeNotificationRule(_ input: DescribeNotificationRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeNotificationRuleResult {
        try await self.client.execute(
            operation: "DescribeNotificationRule", 
            path: "/describeNotificationRule", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about a specified notification rule.
    ///
    /// Parameters:
    ///   - arn: The Amazon Resource Name (ARN) of the notification rule.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeNotificationRule(
        arn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeNotificationRuleResult {
        let input = DescribeNotificationRuleRequest(
            arn: arn
        )
        return try await self.describeNotificationRule(input, logger: logger)
    }

    /// Returns information about the event types available for configuring notifications.
    @Sendable
    @inlinable
    public func listEventTypes(_ input: ListEventTypesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListEventTypesResult {
        try await self.client.execute(
            operation: "ListEventTypes", 
            path: "/listEventTypes", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about the event types available for configuring notifications.
    ///
    /// Parameters:
    ///   - filters: The filters to use to return information by service or resource type.
    ///   - maxResults: A non-negative integer used to limit the number of returned results. The default number is 50. The maximum number of results that can be returned is 100.
    ///   - nextToken: An enumeration token that, when provided in a request, returns the next batch of the results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listEventTypes(
        filters: [ListEventTypesFilter]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListEventTypesResult {
        let input = ListEventTypesRequest(
            filters: filters, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listEventTypes(input, logger: logger)
    }

    /// Returns a list of the notification rules for an Amazon Web Services account.
    @Sendable
    @inlinable
    public func listNotificationRules(_ input: ListNotificationRulesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListNotificationRulesResult {
        try await self.client.execute(
            operation: "ListNotificationRules", 
            path: "/listNotificationRules", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of the notification rules for an Amazon Web Services account.
    ///
    /// Parameters:
    ///   - filters: The filters to use to return information by service or resource type. For valid values, see ListNotificationRulesFilter.  A filter with the same name can appear more than once when used with OR statements. Filters with different names should be applied with AND statements.
    ///   - maxResults: A non-negative integer used to limit the number of returned results. The maximum number of results that can be returned is 100.
    ///   - nextToken: An enumeration token that, when provided in a request, returns the next batch of the results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listNotificationRules(
        filters: [ListNotificationRulesFilter]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListNotificationRulesResult {
        let input = ListNotificationRulesRequest(
            filters: filters, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listNotificationRules(input, logger: logger)
    }

    /// Returns a list of the tags associated with a notification rule.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResult {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/listTagsForResource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of the tags associated with a notification rule.
    ///
    /// Parameters:
    ///   - arn: The Amazon Resource Name (ARN) for the notification rule.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        arn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResult {
        let input = ListTagsForResourceRequest(
            arn: arn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Returns a list of the notification rule targets for an Amazon Web Services account.
    @Sendable
    @inlinable
    public func listTargets(_ input: ListTargetsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTargetsResult {
        try await self.client.execute(
            operation: "ListTargets", 
            path: "/listTargets", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of the notification rule targets for an Amazon Web Services account.
    ///
    /// Parameters:
    ///   - filters: The filters to use to return information by service or resource type. Valid filters include target type, target address, and target status.  A filter with the same name can appear more than once when used with OR statements. Filters with different names should be applied with AND statements.
    ///   - maxResults: A non-negative integer used to limit the number of returned results. The maximum number of results that can be returned is 100.
    ///   - nextToken: An enumeration token that, when provided in a request, returns the next batch of the results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTargets(
        filters: [ListTargetsFilter]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTargetsResult {
        let input = ListTargetsRequest(
            filters: filters, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listTargets(input, logger: logger)
    }

    /// Creates an association between a notification rule and an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client so that the associated target can receive notifications when the events described in the rule are triggered.
    @Sendable
    @inlinable
    public func subscribe(_ input: SubscribeRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SubscribeResult {
        try await self.client.execute(
            operation: "Subscribe", 
            path: "/subscribe", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an association between a notification rule and an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client so that the associated target can receive notifications when the events described in the rule are triggered.
    ///
    /// Parameters:
    ///   - arn: The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.
    ///   - clientRequestToken: An enumeration token that, when provided in a request, returns the next batch of the results.
    ///   - target: 
    ///   - logger: Logger use during operation
    @inlinable
    public func subscribe(
        arn: String,
        clientRequestToken: String? = nil,
        target: Target,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SubscribeResult {
        let input = SubscribeRequest(
            arn: arn, 
            clientRequestToken: clientRequestToken, 
            target: target
        )
        return try await self.subscribe(input, logger: logger)
    }

    /// Associates a set of provided tags with a notification rule.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResult {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tagResource", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Associates a set of provided tags with a notification rule.
    ///
    /// Parameters:
    ///   - arn: The Amazon Resource Name (ARN) of the notification rule to tag.
    ///   - tags: The list of tags to associate with the resource. Tag key names cannot start with "aws".
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        arn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResult {
        let input = TagResourceRequest(
            arn: arn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes an association between a notification rule and an Amazon Q Developer in chat applications topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.
    @Sendable
    @inlinable
    public func unsubscribe(_ input: UnsubscribeRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UnsubscribeResult {
        try await self.client.execute(
            operation: "Unsubscribe", 
            path: "/unsubscribe", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes an association between a notification rule and an Amazon Q Developer in chat applications topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.
    ///
    /// Parameters:
    ///   - arn: The Amazon Resource Name (ARN) of the notification rule.
    ///   - targetAddress: The ARN of the Amazon Q Developer in chat applications topic to unsubscribe from the notification rule.
    ///   - logger: Logger use during operation
    @inlinable
    public func unsubscribe(
        arn: String,
        targetAddress: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UnsubscribeResult {
        let input = UnsubscribeRequest(
            arn: arn, 
            targetAddress: targetAddress
        )
        return try await self.unsubscribe(input, logger: logger)
    }

    /// Removes the association between one or more provided tags and a notification rule.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResult {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/untagResource/{Arn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the association between one or more provided tags and a notification rule.
    ///
    /// Parameters:
    ///   - arn: The Amazon Resource Name (ARN) of the notification rule from which to remove the tags.
    ///   - tagKeys: The key names of the tags to remove.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        arn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResult {
        let input = UntagResourceRequest(
            arn: arn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates a notification rule for a resource. You can change the events that trigger the notification rule, the status of the rule, and the targets that receive the notifications.  To add or remove tags for a notification rule, you must use TagResource and UntagResource.
    @Sendable
    @inlinable
    public func updateNotificationRule(_ input: UpdateNotificationRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateNotificationRuleResult {
        try await self.client.execute(
            operation: "UpdateNotificationRule", 
            path: "/updateNotificationRule", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a notification rule for a resource. You can change the events that trigger the notification rule, the status of the rule, and the targets that receive the notifications.  To add or remove tags for a notification rule, you must use TagResource and UntagResource.
    ///
    /// Parameters:
    ///   - arn: The Amazon Resource Name (ARN) of the notification rule.
    ///   - detailType: The level of detail to include in the notifications for this resource. BASIC will include only the  contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information provided by CodeStar Notifications and/or the service for the resource for which the notification is created.
    ///   - eventTypeIds: A list of event types associated with this notification rule. For a complete list of event types and IDs, see  Notification concepts in the Developer Tools Console User Guide.
    ///   - name: The name of the notification rule.
    ///   - status: The status of the notification rule. Valid statuses include enabled (sending notifications) or disabled (not sending notifications).
    ///   - targets: The address and type of the targets to receive notifications from this notification rule.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateNotificationRule(
        arn: String,
        detailType: DetailType? = nil,
        eventTypeIds: [String]? = nil,
        name: String? = nil,
        status: NotificationRuleStatus? = nil,
        targets: [Target]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateNotificationRuleResult {
        let input = UpdateNotificationRuleRequest(
            arn: arn, 
            detailType: detailType, 
            eventTypeIds: eventTypeIds, 
            name: name, 
            status: status, 
            targets: targets
        )
        return try await self.updateNotificationRule(input, logger: logger)
    }
}

extension CodeStarNotifications {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: CodeStarNotifications, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CodeStarNotifications {
    /// Return PaginatorSequence for operation ``listEventTypes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listEventTypesPaginator(
        _ input: ListEventTypesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListEventTypesRequest, ListEventTypesResult> {
        return .init(
            input: input,
            command: self.listEventTypes,
            inputKey: \ListEventTypesRequest.nextToken,
            outputKey: \ListEventTypesResult.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listEventTypes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filters: The filters to use to return information by service or resource type.
    ///   - maxResults: A non-negative integer used to limit the number of returned results. The default number is 50. The maximum number of results that can be returned is 100.
    ///   - logger: Logger used for logging
    @inlinable
    public func listEventTypesPaginator(
        filters: [ListEventTypesFilter]? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListEventTypesRequest, ListEventTypesResult> {
        let input = ListEventTypesRequest(
            filters: filters, 
            maxResults: maxResults
        )
        return self.listEventTypesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listNotificationRules(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listNotificationRulesPaginator(
        _ input: ListNotificationRulesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListNotificationRulesRequest, ListNotificationRulesResult> {
        return .init(
            input: input,
            command: self.listNotificationRules,
            inputKey: \ListNotificationRulesRequest.nextToken,
            outputKey: \ListNotificationRulesResult.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listNotificationRules(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filters: The filters to use to return information by service or resource type. For valid values, see ListNotificationRulesFilter.  A filter with the same name can appear more than once when used with OR statements. Filters with different names should be applied with AND statements.
    ///   - maxResults: A non-negative integer used to limit the number of returned results. The maximum number of results that can be returned is 100.
    ///   - logger: Logger used for logging
    @inlinable
    public func listNotificationRulesPaginator(
        filters: [ListNotificationRulesFilter]? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListNotificationRulesRequest, ListNotificationRulesResult> {
        let input = ListNotificationRulesRequest(
            filters: filters, 
            maxResults: maxResults
        )
        return self.listNotificationRulesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listTargets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listTargetsPaginator(
        _ input: ListTargetsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListTargetsRequest, ListTargetsResult> {
        return .init(
            input: input,
            command: self.listTargets,
            inputKey: \ListTargetsRequest.nextToken,
            outputKey: \ListTargetsResult.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listTargets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filters: The filters to use to return information by service or resource type. Valid filters include target type, target address, and target status.  A filter with the same name can appear more than once when used with OR statements. Filters with different names should be applied with AND statements.
    ///   - maxResults: A non-negative integer used to limit the number of returned results. The maximum number of results that can be returned is 100.
    ///   - logger: Logger used for logging
    @inlinable
    public func listTargetsPaginator(
        filters: [ListTargetsFilter]? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListTargetsRequest, ListTargetsResult> {
        let input = ListTargetsRequest(
            filters: filters, 
            maxResults: maxResults
        )
        return self.listTargetsPaginator(input, logger: logger)
    }
}

extension CodeStarNotifications.ListEventTypesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CodeStarNotifications.ListEventTypesRequest {
        return .init(
            filters: self.filters,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension CodeStarNotifications.ListNotificationRulesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CodeStarNotifications.ListNotificationRulesRequest {
        return .init(
            filters: self.filters,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension CodeStarNotifications.ListTargetsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> CodeStarNotifications.ListTargetsRequest {
        return .init(
            filters: self.filters,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
